﻿@model SDE_FIC.Models.Matricula

@{
    ViewBag.Title = "Editar";
    Layout = "~/Views/Shared/_Layout_Sistema.cshtml";
}

<h2>Editar</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Matricula</legend>
@*        <div class="editor-label">
            @Html.LabelFor(model => model.IdMatricula)
        </div>*@
@*        <div class="editor-field"><b>
            @Html.DisplayFor(model => model.IdMatricula)</b>*@
            @Html.HiddenFor(model => model.IdMatricula)
            @*@Html.ValidationMessageFor(model => model.IdMatricula)
        </div>*@
        <div class="editor-label">
            @Html.LabelFor(model => model.DataMatricula, "Data Matricula")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DataMatricula)
            @Html.ValidationMessageFor(model => model.DataMatricula)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Aluno.IdAluno, "Aluno")
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => Model.Aluno.IdAluno, ViewBag.aluno_idaluno as SelectList)
            @Html.ValidationMessageFor(model => model.Aluno.IdAluno)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Turma.Idturma, "Turma")
        </div>
        <div class="editor-field">
            @*@Html.EditorFor(model => model.turma_idturma)*@
            @Html.DropDownListFor(model => Model.Turma.Idturma, ViewBag.turma_idturma as SelectList)
            @Html.ValidationMessageFor(model => model.Turma.Idturma)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Situacao, "Situação")
        </div>
        <div class="editor-field">
            @*@Html.EditorFor(model => model.situacao)*@
            @Html.DropDownListFor(model => model.Situacao, new SelectList(
                  new List<Object>{ 
                                   new { value = "Ativo" , text = "Ativo"  },
                                   new { value = "Evadido" , text = "Evadido" },
                                   new { value = "Desistente" , text = "Desistente" },                                                                      
                                  },"value","text"))
            @Html.ValidationMessageFor(model => model.Situacao)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DataSituacao, "Data Situação")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DataSituacao)
            @Html.ValidationMessageFor(model => model.DataSituacao)
        </div>

        <p>
            <input type="submit" value="Salvar" class="btn btn-sucsess " />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Voltar para Listagem", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
